using Services;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[DefaultExecutionOrder(-100)]
public class ContainerUI_Manager : MonoBehaviour
{
    public UnityAction<bool> VisibleChange;

    public ContainerUI_Panel Panel { get; private set; }
    public Player Player { get; private set; }
    public Container Container { get; protected set; }
    public ContainerUI_SelectButtonManager SelectButtonManager { get; private set; }

    protected Image backGround;

    protected virtual void Awake()
    {
        backGround = GetComponent<Image>();
        Panel = GetComponentInChildren<ContainerUI_Panel>();
        SelectButtonManager = GetComponentInChildren<ContainerUI_SelectButtonManager>();
    }

    protected virtual void Start()
    {
        Player = ServiceLocator.Get<ActionController>().player;
    }
}
